package com.wh.advice.controller;

import com.wh.advice.model.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;


@RestController
public class TextController {

    @RequestMapping("/text1")
    public Integer text1() {
        return 100;
    }

    @RequestMapping(value = "/text2", produces = "application/json")
    public String text2() {
        return "text";
    }

    @RequestMapping("/text3")
    public Result<List<Integer>> text3() {
        List<Integer> list = new ArrayList();
        list.add(1);
        list.add(2);
        list.add(3);
        return Result.success(list);
    }
}
